import * as actionTypes from "./instance";
import { userLevel, userVip } from "@/services/my";

const my_userLevel = (res) => ({
  type: actionTypes.USERLEVEL,
  levelInf: res,
});
const my_userVip = (res) => ({
  type: actionTypes.USERVIP,
  vipInf: res,
});

export const myUserLevelAction = () => {
  return (dispatch) => {
    userLevel().then((res) => {
      dispatch(my_userLevel(res));
    });
  };
};
export const myUserVipAction = () => {
  return (dispatch) => {
    userVip().then((res) => {
      dispatch(my_userVip(res));
    });
  };
};
